Conversation
…e in ProvidedTypeDefinition; prepare release 8.9.0 - Add GenerativeNestedTypesTests.fs: 5 tests for generative nested type providers (Book class: constructor, Title property, GetSummary method; Shelf class: constructor, Label property, MaxItems static property) - Refactor GetNestedTypes and GetMembers in ProvidedTypeDefinition to use canBindNestedType instead of the inconsistent `memberBinds ... || m.IsNestedPublic` pattern; aligns with the existing canBindNestedType used in TypeSymbol and TargetTypeDefinition, and correctly respects BindingFlags.NonPublic for nested types - RELEASE_NOTES: bump to 8.9.0 - 157/157 tests pass Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dsyme
approved these changes
Apr 23, 2026
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
Two improvements bundled together (Tasks 9/5):
Task 10 — Forward Progress:
GenerativeNestedTypesTests.fsAdds 5 focused tests for generative type providers that host nested provided types:
Book and Shelf are presentBook has Title property and GetSummary methodBook constructor sets fields; GetSummary returns expected stringShelf Label property reflects constructor argumentShelf static property MaxItems returns 100The provider sets up a
Librarycontainer with two nested classes (Book,Shelf), each with fields, constructors, instance/static properties, and instance methods.Task 5 — Coding Improvement:
canBindNestedTypeinProvidedTypeDefinitionGetNestedTypesandGetMembersonProvidedTypeDefinitionpreviously filtered nested types using the inconsistent condition:Because
|| m.IsNestedPublicis appended outside thememberBindscall, a nested public type (IsNestedPublic = true) was always included regardless ofBindingFlags— e.g. even when onlyBindingFlags.NonPublicwas set.The
canBindNestedTypeutility (already used inTypeSymbol.GetNestedTypesandTargetTypeDefinition.GetNestedTypes) correctly handles this:All 157 tests pass (152 before + 5 new
GenerativeNestedTypesTests).